home *** CD-ROM | disk | FTP | other *** search
Wrap
/* $Id: I3DSHScn.H 1.22 1997/06/18 19:42:04 joshua-pc Exp $ */ /*****************************************************************************\ * * * I3DShScn.h * * I3DShScene definition * * * * Copyright (c) 1995, Ray Dream, Inc. All rights reserved. * * * \*****************************************************************************/ #ifndef __I3DSHSCN__ #define __I3DSHSCN__ #ifndef _COMPOBJ_H_ #include "RCompObj.h" #endif #ifndef __3DBSTYPE__ #include "3DBsType.h" #endif /*#ifndef __I3DSHOBJ__ #include "I3DShObj.h" #endif*/ /*#ifndef __I3DSHTRE__ #include "I3DShTre.h" #endif*/ struct I3DShObject; struct I3DShTreeElement; struct I3DShGroup; struct I3DShInstance; struct I3DShLightsource; struct I3DShCamera; struct I3DExGenericData; //****** Globally Unique Ids ************************************************** DEFINE_GUID(IID_I3DShScene, 0xD4E4AC00L, 0x3A02, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02); struct SceneStatistic { long fNumberofObject; long fNumberofLight; long fTextureMapSurface; long fTextureMapSize; }; /*****************************************************************************\ * I3DShScene * * * * Topmost data structure that contains all the data of a scene. * * * \*****************************************************************************/ struct I3DShEnvironment; #undef INTERFACE #define INTERFACE I3DShScene DECLARE_INTERFACE_(I3DShScene, IUnknown) { // IUnknown methods STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; // I3DShScene methods //-- 3D Objects list STDMETHOD_(ULONG, Get3DObjectsCount) (THIS) PURE; STDMETHOD_(I3DShObject*, Get3DObjectByIndex) (THIS_ ULONG index) PURE; // index is 1 based STDMETHOD_(I3DShObject*, Get3DObjectByName) (THIS_ char* name) PURE; STDMETHOD(Insert3DObject) (THIS_ I3DShObject* object) PURE; STDMETHOD(Remove3DObject) (THIS_ I3DShObject* object) PURE; STDMETHOD(Changed3DObject) (THIS_ I3DShObject* object) PURE; //-- Tree root (Universe) setting STDMETHOD_(I3DShGroup*, GetTreeRoot) (THIS) PURE; STDMETHOD(SetTreeRoot) (THIS_ I3DShGroup* universe) PURE; // Works only if there was no tree root in the scene STDMETHOD(CreateTreeRootIfNone) (THIS) PURE; //-- Quick tree access STDMETHOD_(I3DShTreeElement*, GetTreeElementByName) (THIS_ char* name) PURE; STDMETHOD_(ULONG, GetInstancesCount) (THIS) PURE; STDMETHOD_(I3DShInstance*, GetInstanceByIndex) (THIS_ ULONG index) PURE; // index is 1 based STDMETHOD_(ULONG, GetLightsourcesCount) (THIS) PURE; STDMETHOD_(I3DShLightsource*, GetLightsourceByIndex) (THIS_ ULONG index) PURE; // index is 1 based STDMETHOD_(ULONG, GetCamerasCount) (THIS) PURE; STDMETHOD_(I3DShCamera*, GetCameraByIndex) (THIS_ ULONG index) PURE; // index is 1 based //-- Misc. render settings STDMETHOD(SetProductionFormat) (THIS_ NUM3D sizeh, NUM3D sizev, NUM3D dpi) PURE; // sizeh and sizev in points (=1/72 inch) STDMETHOD(GetProductionFormat) (THIS_ NUM3D* sizeh, NUM3D* sizev, NUM3D* dpi) PURE; // sizeh and sizev in points (=1/72 inch) STDMETHOD(CreateRenderingCameraIfNone) (THIS_ ULONG cameraType, BOOLEAN createDistantLight) PURE; STDMETHOD_(I3DShCamera*, GetRenderingCamera) (THIS) PURE; STDMETHOD(SetRenderingCamera) (THIS_ I3DShCamera* camera) PURE; //-- Misc. Animation STDMETHOD_(ULONG, GetTime) (THIS_ NUM3D* ticks) PURE; //-- Misc. Utilities (API level 6) STDMETHOD(GetProductionFormatBBox) (THIS_ BOX2D* prodFormat, NUM3D* dpi) PURE; // New call for non centered production frame. Use instead of GetProductionFormat STDMETHOD(GetFullPathName) (THIS_ char* pathName) PURE; STDMETHOD_(I3DShTreeElement*, GetTreeElementFromFullName)(THIS_ char* fullName) PURE; // Returns instance with given full "path name" or NULL if no such instance is in the hierarchy STDMETHOD(GetAmbientLight) (THIS_ COLOR3D* color) PURE; //-- Better render settings access (API level 7), using 'renderHelper' STDMETHOD(GetProductionFormatBBox7) (THIS_ BOX2D* prodFormat, NUM3D* dpi, void* renderHelper) PURE; // Use this call if you have a renderHelper (see Post Render Filters). renderHelp=NULL gives same behavior as GetProductionFormatBBox() STDMETHOD_(I3DShCamera*, GetRenderingCamera7) (THIS_ void* renderHelper) PURE; // Use this call if you have a renderHelper (see Post Render Filters). renderHelp=NULL gives same behavior as GetRenderingCamera() // API v9 STDMETHOD(SetTime9) (THIS_ ULONG microticks, Boolean UpdateViews) PURE; STDMETHOD(GetFPS) (THIS_ short* fps) PURE; STDMETHOD(GetSceneStatistics) (THIS_ SceneStatistic& sceneStat) PURE; //-- Collision detection (API level 9) STDMETHOD_(Boolean, DetectCollisionWithObject) (THIS_ I3DShTreeElement* object1, I3DShTreeElement* object2, CollisionInfo& ci, short SurfaceFidelity, Boolean UseVelocity, VECTOR3D Velocity1,VECTOR3D Velocity2) PURE; STDMETHOD_(Boolean, DetectCollisionWithScene) (THIS_ I3DShTreeElement* object1, CollisionInfo& ci, short SurfaceFidelity, Boolean UseVelocity, VECTOR3D Velocity1, VECTOR3D Velocity2) PURE; //-- Animation Values STDMETHOD(GetAnimationValues) (THIS_ long *begin, long *end, long *frameRate) PURE; //-- Comments STDMETHOD(GetComment) (THIS_ char* comment) PURE; STDMETHOD(SetComment) (THIS_ char* comment) PURE; //-- Data Components STDMETHOD_(ULONG, GetDataComponentsCount) (THIS) PURE; STDMETHOD_(I3DExGenericData*, GetDataComponentByIndex) (THIS_ ULONG index) PURE; // index is 1 based // --- Environment --- STDMETHOD_(I3DShEnvironment*, GetEnvironment) (THIS) PURE; STDMETHOD_(COLOR3D, GetAmbientLightColor) (THIS) PURE; }; #endif